Reduce scope of "pin" variable.