Fix -- switch

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