Dismiss progress view when error occurs