fixed bug in pQ.c