Fix issues deleting pockets and selecting when some pocket is deleted.