bugfix: endless loop in loadMap