Corrected bug parsing datetimes