Fixed attributes being set more than once