more JS modal dialog changes/fixes