fixed resending chunks when buffer is full