fixed error that caused duplicate cells to be added to grid