fix bug if raster layers are loaded*