Fix repo key initialization