Fixed race condition in smart pointer to TimerHandler initialization