Made dialog work.