improve the dialog boxes: now user can cancel without error, and ok_cancel buttons are correctly drawn