Made maploader more robust