stdin and stdout getting connected to the wrong things!