Follow on from CVE-2014-3571. This fixes the code that was the original source