Fix error when unflagging cells.