fix exported keyGen