re-order instructions in test to avoid deadlock