change to prevent segmentation fault on larger text