Bug fixes for date time parsing