fixed bug with empty date