Fixed bug where text construct's type attribute was not considered.