Added locomotion state checking to commands