fixed errors in map loading