Dialog fixes.
Logic fixes.