Merge "Fix vulnerabilities and bugs in policy/engine"