fixed bug where program file name was being used as input