Fixed a bug with the sharing functionality