correcting indexing in rasterPlot