Added a bit of code to preserve the session across the call.