fix the KeyError with TEXT