Fix static middleware.