Fix deserializing from JSON