Fix errors in save changes script