Fxed bug in (grid-product) function