fix path_same logic in serve api