Fix race condition where self.timer is reset after if test but before it's used.