Fix for two security issues