Tail lights not working properly

Have you cleaned the sockets, bulb contacts and added some dielectric grease?

You can also run extra ground wires from the body to each housing.