Fix terrible index out of bounds bug in cmd line parsing. This was introduced by me :(