Fix attribute saving issues