small bug fixes in class