Task#5593 check/clear session in case of broken state