Input from STDIN fix

Bugfix to taking input from STDIN