fix for grid checking