Fixed progress dialog that not hide correctly