fixing malformed date error