Fixed variable name issue in pixel2map function.