Fixed error in preprocessing