Fix a bug of createClass.