fixing some bugs
Merge pull request #32 from liyili2/java_rewrite_engine4

fixing some bugs