Fix -- switch

before, this loop would run with no parameters remaining and `shift` would complain. now, it looks ahead one parameter so there's always one to shift.