fixed crash when sensor just got added and there is no historical value