Fix bug select tree node when DOM is not initialized