Fix feature vector generation.