Fixed minor bugs in voltage reading