Fix middleware
Merge