fix modulo bug with sonar sensors