fixed extension parsing when working with URL parameters