Fix top-level item creation bug