Bug fix in getGrid