Fixed inf bug