Fixed bug with incorrect handling of the text type