Fix a bug that cannot add ProgressDialog