Fix head title under certain conditions