Minor change, apparently the middleware can be called repeatedly.