fixed serialize which was ignoring objectids & date types