Small fix for calculation of last bytes when target is written to disk