Added mode initialization to fix jags moving at different speeds