fix bug in calculating voltage from resistance and power