Added some checks for middleware
Bump version