Bug fixes

Should now allow calling open dialog functions from within the callback
functions of dialogs.