Fix bug when title attribute exists but is empty