fix empty history and enhance fold function
hightlight first child