fix use of class currentTime variable