fix the hungry bug (in shell, stdin was grabbed)