Ctrl-D hang bug fixed!