Fixed minor bug in class