empty nodes in inference removed