fix pendulum example