Immediately after his capture, Geidl switched sides and was commissioned as a captain in the Montenegrin Army.
At the end of 1916 the battalion was destroyed and Gajda joined the Czechoslovak Legions (30 January 1917) as a staff captain.