Fixed issue #1

Fixed app crashes caused by NULL characters in the incoming data stream.