defined self property to fixed undefine var issue