Fix select clause on belongsToMany relation