Fixed error in getgrid