JS fix for share object handlers