This isn't very robust; it will fail if we add new attributes and this isn't updated.