Fix Pq factory