fixing resource object when saving