fixed a small bug in class object