fix bug: when $ in source code, may cause strange behaviour