Fix path query bug