fix a bug regarding tex-text box inside for loop