ctrl-D no longer segfaults. Just exits the program as needed