Fixes saving of objects