fix finalize with padding (might have several unwritten parts)