fixed bug in postgres binary serialization involving null bytes