move timer.stop to finally