Fixing the "has and belongs to many" mess.