when in data array mode, write 0 instead of null so it doesn't close the stream