Security-related fixes