Fixed classes

Fixed bugs into classes.