Fixed a horrible bug

Middlewares in stack should now stay safe when loading a new module