Changed matchCells to be more robust