Fix scope/shadowing issue in 'whois' command