Fixed reservation bug in Middleware.