fixed up some code in crafting