changes to set_globattr

These changes are relatively minor, but take a look in case they do anything crazy!