fixed scope in call to restoreClickHandlers

Also took care of a name overlap/shadow.