Fix titleize function