Double security fix for issue #19