fixed null reference in for sharing files