Fixed bug where finalBlockLength was not properly assigned for the last piece