fixing bug where final chunk is ignored if it stands alone.