fix attribute saving