bug fix for appending to large strings