remove deprecated middleware