Fixed null error when loading map