Fixed negative number from sensor problem