fix schema attachment method due to Collection2 change