Changed the way widget tree is updated