some bug fixes that hindered the animation