fixing class names for prepended and appended text