fix invalid sharing crash