Fix tlv length - need to divide by 8 to get num
Add missing curly braces