fixed few issues when auto save