Fixed bug in alloy generation