Bugfix for share_pointer