Make res middleware reflect opposite direction

`prev` is the natural opposite of `next`.
Merge pull request #1 from timshadel/patch-1

Make res middleware reflect opposite direction