fix some bugs that caused by modifying function names