remove duplicated middleware