Fix a bug with selecting columns when accessing many to many relation.