modal dialog bug fix