Rebuilt lost sensor code