remove useless middleware