You are using Ref in broadcasting correctly. Ref inhibits broadcasting from iterating over the fields of p.