Fix title logic