pypy, fix preprocess bug and optimization