Fix date formatting bug