Fixed bug with holdTime and upTime