fixed index issue with sys.argv