Fix linking problems