Fixed Ctrl-D behaviour when entering program from keyboard