fix contains method for netmasks