Fix for #183

@devn could you take a look at this since you handled the CVE that broke this behaviour?