Fixes the null-terminated string issue