added tree control
fix tree control bugs