Improve the grid sampling