Fixed bug with format of date