Fix bug about share function