Fix problem with site policy
Use modern functions instead deprecated ones