Fixed memory leak problem causing stringsort to fail after multiple iterations