Changed some code in ytcenter.dialog to get better compatibility.