fixed a bug.

if character is null, byte[] does not contain that information