#345 / #346 Fix for wrong execution order of Rack Middleware