Updated za to fix middleware