Fixed the size problem of dialog.