fix while loop when no -it option