fixed nullReference in setTime