turn off middleware