Add missing "var self = this"