Changes where attributes are added. Fixes #1