Fix typo.
Reuse attrs variable.
Fix name clash due to recent renaming.