Important fix related to stop session internal loop.
More on API.