remove refer all from middleware