Removes STDIN refs.