fixed dialog bug