Fixed a bug in map loading