#1030 : make preprocess logic more precise