Fix performance when case or timeout of session is here. references #46