Fix segfault in map model loading