tries to fix null byte string problem