Fix for dates not getting formated correctly.