For next time, there is a easy way to fix those wires, drill holes in the middle of the boots on the valve covers. I think a size 77 is what I use. So already have the holes , I assume so drill deeper right thru the head and into the block if you have to. Then just push or pull the wires to get them into position. Should not even need to use glue. Might not be too late to do this with your engine.
Jeff