fixed issue that prevented the script from reading input from command line.