Fix bug check session loss