fixed check_time() issues