Fixed a problem with saving