Fix errors with classes