Added debugging calls to the events controller