handle deprecated classnames when setting title.

i'm not a huge fan of this patch, but it looks to work pretty well.