You are not removing the last entry as we do in the current ```path_segments```. Is that intentional?