ctime bug fix