Changed WHERE Clause to look for an exact match and not use wildcards, also unset some variables after they are no longer needed.