Fix title function