Fix bug in share saving.