Fixed so that event dialog finishes on click