non-visible cell remains selected after deselect

Fixed bug where non-visible cell remains selected after calling deselect.