Fix up the printing of work orders, make sure the variables are correctly set etc