Fixes attribute setting errors