fix some raster memory leaks