no longer missing bytes when reading images in chunks