Fixed grid routine issue