Fix shift when parsing frame length