tweak middleware.
Merge pull request #78 from airballoon/bingo

tweak middleware.