fixed stupid errors in preprocessing