fixed issue with NULL time fields