Fixing an error when parsing collection with a specified root element.