fix bugs on text element