Pharmacy sensor bug fix