fixed prompt to end loop