Fixed initial minimizing in dialogs