Fix error with update_attribute call