Fixed an issue on focus when root node is removed