Thanks I had forgot to add the clamping diode.