fix bug with starting positon outside of raster window