Fix broken read from 'stdin'