Fix crashiness and bugs in share submission.