Move onDispatchCollection attachment to be conditional
Better logic when adding metadata to collections