Small modifications to setObjectAttributes