fix error on text node selected