Fix bug in create_work_order/2