Added special optimized support for regular grids