Shouldn't this be behind a if ("remoteTrigger" in params) { ?