Some modification with ProgressDialog implementation