Correct bug when setting 'class' option.