Taking snapshot before changing selection logic