fixed animation weirdness on change direction