fix a leak when calling constructor with string arguments