Fix sampling bug in PV extraction