Fixed bug in joining a class.