Fix bug with sensors mode switch