Fix certificate gen