fix keys creation