Fixed pendulum.py.