Fixed small SQL bug in feature extractor.