Fixed bug caused by unremoved self reference in refactoring