fix error in event controller