Added key generation after crafting