fixing wiring issues