Fixed issues with security permissions