fixed bug in feature extraction