fix ring.middleware declarations