fix compile bug after renaming some variables