Thanks, that might explain why some of the middleware wasn't working correctly. I'll update this pull request shortly.