Have you tried swapping the green and white wires for encoder?