Fixed bug with exit in save method