fixed dialog problem