saveallfig() bugfix