fixing EOF errors in cli
oops! fixing an edge case in the ai