Fixed an error in usage of threading.Timer