Fix whole UI gone after 6a9283a
apply 991bce43 and c2155788