Fix linking order