added check for duplicate packets in the window downloader;
fixed a bug about calculating the amount of chunks needed;