[Client] Fixed problem when closing dialogs