Fixed the argv logic and parsing