Fixed error in voltage reading