Fixes to preprocessing

Preprocess bug fixed.