Fix for IllegalStateException: Timer was canceled?