Clean up buffering of STDIN