Fixed problems in CellTest and GridTest