dialogs now working properly