preserve selection when switching to table view