I believe you need `break loop` to break out of the select.