Fixes the undefined variable stdout bug.

Fixes #383