fixed dialog creation