fix some undefined references