r5273: fixed another bug in the code that keeps timed events