Fixed error where argv[0] was mistakenly used instead of argv[1].