Bugfix: ensure @choice is set
Bugfix: trying to ensure URLs are built correctly

This is a little speculative; the line numbers in the stack trace are nonsensical.