fix some linking errors