fixed middleware params
Merge pull request #39 from yogthos/master

cleaned up middleware app-handler