corrected a typo in inference.r