Fix some weird dialog position bugs.