fixed buggy progress dialog incase of network error.