fix preprocessing step