fixed random printing, and no command being entered