Fixed server listening to event in correct place.