Fixed a problem where the TreeMap for resources would not clone