Added code to set timer ID to null when no timer is running.