fix assert error, because printedText was null