Fixed issue with models clearing after deserialization