Make d a local variable.