Fixes the undefined variable stdout bug.
Merge pull request #384 from Ralt/fixes-undefined-variable-stdout

Fixes the undefined variable stdout bug.