fix a bug where updated data didn't actually save