fixed a problem for drawing large rasters