Fix bug with certificate signing