Fixed IR filtering to remember previous reading.