Fix last instance remaining selected when deleted