Fixes issue with if tests and orders.