fix an unexpected error occurred problem