fixed a bug or two
Merge branch 'dialog'