Fix bug in automated TT scanner