Fix saving of Global Attributes so that it immediately updates the cached global attribute values

fixes #120