fix a simple bug in feature extraction