fixed null pointer exception for some deserializing case