fixes #103 - 2 functions, inf loop
Merge pull request #104 from grutz/vuln_ref_fix

fixes #103 - 2 functions, inf loop