fix some undeclared variable in last merge