correct error handling at session timeout: issue #3