Made sensor more failure proof