fixed bug for access point encryption