Fix repeated certificate generation