fix handling of title tag