fix variable check, fix for grids that render toolbars and headers