Fix aa bug about custom certificate unavailable