Pass config rather than assuming it exists.