Fix cleanup in case of argument error.