only execute activity js code when target is available
fix cache key for user's records