more bug fix to p0/p1