remove defer in SystemResources, because much more memory used