Fix for setting ref and arguments for test.tree/run.