Added function to disable events for activity