Added functionality for updating valid dead cells.