Fixed a bug with sharing that caused the sharing to crash.