Fix forwarded middleware