fixed generic class bugs