fixed bug in txt api