Fix the bug introdiced in PR #866, where the $format was never set.