edit result frame width and add error dialog box