Fixed a bug where items with no children failed.