final security improvements