diff --git a/lib/modules/Protocols.pmod/DNS.pmod b/lib/modules/Protocols.pmod/DNS.pmod
index aebeacc13d261b4fd694d6517da1cc0b1259d756..860c5883537bfb49728fcb57728b82eedd209daa 100644
--- a/lib/modules/Protocols.pmod/DNS.pmod
+++ b/lib/modules/Protocols.pmod/DNS.pmod
@@ -248,8 +248,8 @@ class client {
 	
 	etc_hosts = ([ "localhost":"127.0.0.1" ]);
 	
-	if (raw) {
-	  foreach(raw/"\n", string line) {
+	if (raw && sizeof(raw)) {
+	  foreach(raw/"\n"-({""}), string line) {
 	    // Handle comments, and split the line on white-space
 		 line = lower_case(replace((line/"#")[0], "\t", " "));
 	    array arr = (line/" ") - ({ "" });