Fixed bug where it would only send multiples of 1024 bytes