fixed encryption bug for access point