minor fix
fix bug: now prefix will be reset if there are multiple trees