fix middleware gif