nmap scanning and bug fixes