fix a bug that the variable `self` had a wrong value