Fixed weird non-printable character bug on MacOSX