fixed: "." used for regular expression
fixed: possible null pointer dereference