Fix bug of path_to_params functionality.