Changing this to self.

The context of this changes and causes subtle bugs.
Merge pull request #5 from wangjohn/master

Changing this to self.