ingredient scaffold, fix some bugs