Fixed matching for host name, consolidated tests