Take a voltmeter and do the following.

1. Check for positive voltage at the ignition (tilted yellow wire). It should only have positive voltage when cranking.

2. Check for a ground on the ground (brown wire). It should only have a ground when the car is in park/neutral (automatic) or when the clutch is pressed (manual tramsnission).

3. When it is stuck in crank mode check for voltage at the center terminal. It should only have voltage when cranking with the key and in park/neutral or clutch depressed.

If someone has been in the wiring the colors could be different but the position on the relay are the same.

From the factory the ground has a special connector that will not allow it to be connected anywhere else on the relay.