fixed toJava deserialization