Updated title logic