minor bug fix for -g grid data sampling