Remove redundant middleware.