Wrapped pulsing in closure to fix mutable key variable.