Fix error in class