fixed the text update bug