Fixed possible segfault caused by use of static string.