Fixed a bit in sensor reading