Prevent SessionUnavailableException when returns back from service.
Merge pull request #462 from Koc/fix-session

Prevent SessionUnavailableException when returns back from service.