fix dialog bug