fix dialog toggle behavior: opening one dialog closes the other one