Fix certificate issues and others