fix sniffer.js bug