make raster mode buffer-safe