small fixes to pendulum