fix share function