Default to agency ID of 1 for agencies without ID.

Fixes #217.