Fixed bug (omission of var self = this).