Small optimization and fix to Text.