fix a few linking errors