fix sudden exit in general selector