Fixing dispatch router bug

- Fixes bug where dispatch router was getting popped before output
  content had been rendered.