Corrected invocation of key generator