minor bug fixes for de-serialization process