Fix bug in share button code