Fixed an error in self.off method
[ci skip]