Fix bug in HttpModule refactoring