Tweaks to trumpet middleware