Proper fix for date parsing