correct error by ending a session