Fix issue #24: cancel not removing periodic timers.