Fixed some bugs in the double pendulum animation engine