Fix off-by-one error when processing client id from the command-line

Fixes an off by one error when specifying a clientid via the command-line