Fixed and tested save as, and a bug in save