Fix error formatting bug if a parent item did not exist