fixed CS deserialization from Postgres