Improve error when deserialization