wrap middleware around push in bulk mode and single mode

The only issue with this is it could generate very large stacks.