Updated the resque Middleware