Fixed some errors

Fixed some errors caused by the changes in class.