On my Giant Trance with the yamaha motor, one of the connectors (I'm assuming it's for the controller cable) was broken, and the bike had similar symptoms as you (the bike shop had previously replaced the main power cable)
When I put the motor back in, I covered this with liquid electrical tape...