Tweak the handling of p0 and q0