Adding fix for data sometimes not being read fully when below 8192 bytes long.