Fixed the problem that ShuffleSerializer does not always read the full
bytes and as a result returning negative byte array len.