Close #162, fix bug in preprocess handling