Fixed issue when saving categories. Was always searching for events and not checking the published state.