Fix the valid condition of text update