I managed to remove the pins (17 of them!) with a small screwdriver. Replaced them in the same orientation.
However i now have the problem of the pins working their way out of the connectors. Any ideas?
I've tried taping them in, cable ties, and brute force but they still come out eventually.