Fix constraint serialization