Allocation fixes in string library (now we can run bigger tests!)