improve error handling when root element in a composite is incorrect