fix missing parameter and prepare function issue
Merge branch 'tmp'