correctly stopping timer