fixes to the TreeModel and Client