remove unnecessary middleware