Fixed accepting input via STDIN.