fixed selection reset bug