entity: fixed serialization