fix bug when inferring recursive functions