Fix for when 'base' appears in URL