Fix up the printing of work orders, make sure the variables are correctl...

...y set etc