How do you display the byte array?
It sounds like you displayed it like a string using a MessageBox?
A string is cut off when it reads the nullterminator which is a plain 0