Fixed FQDN selection to be indepentant of /etc/hosts order and added M806 support