Looks like you maybe pulling too many amps when both head unit and fan is switched on simultenoulsy, or as you say a poor connection to ground, to eliminate the earth problem run a length of 1.5 mm multicore from a decent earth point, there is one situated i behind the head unit where the dash mount connects to the bulkhead, i would then run permanent live to the radio direct from the spare slots at fusebox, ensure you connect a 10 amp spade fuse in series for safety, check then the operation of all ancillaries to ensure smooth operation, if the faults U describe disappear you know it's either a fauty earth or the circuit that is tied into is pulling too many amps, by the way tyng into a permanent liev will require U to manually switch off your HD