fix issue where trailing slash is removed for star segments