Fixed issue with using app var instead of self.