bug fix: enable closure for deviceId