Fixed error handling for ttt.