remove module middlewares