Bug fix on text length check.