fixed the invalid value for text error