Corrected varbinary and date types serialization