Fix bug in feature selection