Fixed an issue with patching collections.