fix that stupid stdin is truncated bug again

Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>