Shunt compensation