An infusion pump system is disclosed. The system includes a syringe having a plunger within the syringe barrel, the syringe having an exit end, at least one temperature determination device adjacent to the syringe, at least one device to determine the distance the plunger has moved with respect to the syringe barrel, and a pump processor in communication with the at least one temperature determination device and the at least one optical sensor, wherein when the controller determines a change in temperature and a corresponding plunger movement, the controller increases or decreases a preprogrammed basal rate of the infusion pump by a predetermined amount for a predetermined time.