trying to fix issue #51 (for grids)