check for shareid before checking shareid[0]
Merge remote-tracking branch 'origin/master'