key generator fixed