PV calculation bugfixes