Fix two security issues