bytes[1] should be bytes[offset+1], changed.