Dundee boss Hartley admits fight to keep star player