Fix issue with rounding error in raspberry pi