fix ep and middleware