Handles empty segments properly.