fix some security issues