Properly calculate certificates