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