fix build/link issues