Group example fix

Some of the JS in the group example was unreachable. This fixes it, and improve a bit the wording of the error message too.