changes for dialogs (but still not working)
dialogs problem fixed