fixed inference problem