Bug Fix

Fixed a problem with the voltage calculation function