remove middlewares, using callbacks