fix adding widget to dialog