Fix timer queue

See #1245