Fixed bugs in texcontent processing