fix bug with chunks being 1

sometimes, when downloading the last bit of file, it can happen that the last 64kb will fall in to two chunks and that will be requested.