Fix Entity deserialization