fix query router for p5