remove unused middleware