fix a couple modal dialog bugs