fix preprocessing