Added thread-lock to prevent collectio enumeration failures