fixed coding style
Fixed autojoining subclass relations