Fixing security issues

fixes issue #104