Fixes serialization of Date objects