changed settings middleware