fix some linking stuff