Fixed a bug in skipping padded bytes