added exception for unknown grids
minor adjustments