Fixing the MapAlgorithm