securitycontext and other fixes