Middleware fix

Let me know what you think!