Fix undefined error with textrange

Undefined array error.