# Problem with determining currents in multi-source circuit

I need to solve the circuit shown below:

simulate this circuit – Schematic created using CircuitLab And here is my attempt.

I'm sure my attempt is wrong here but I'm not really sure why.

I've tried to use the mesh method to determine the currents in the cicuit. I've ended up with these equations for the currents:

$$i_A = i_1\\ i_B = i_2 - i_1\\ i_C = i_2 - i_3\\$$ And KVL: $$1:\; 9V - 10k * i_A + 20k*i_B - 10V = 0\\ 2:\;10V - 20k * i_B - 30k * i_C + 12V = 0\\ 3:\;12V + 40k * i_C - 30k * i_C = 0$$

Based on these equations： $$i_A = -766\mu A\\ i_B = -330\mu A\\ i_C = -370\mu A$$ I've tested this cicuit in a simulator (falstad) and the current on R1 should be 420μA, which points to a really big mistake on my account. Any help or tip how to fix these equations would be welcomed.

$$\begin{cases} 10k \cdot Ia + 20k \cdot (Ia-Ib) + 10V - 9V = 0 \\ 20k \cdot (Ib-Ia) + 30k\cdot (Ib-Ic) - 12V - 10V = 0 \\ 30k \cdot (Ic-Ib) + 40k\cdot Ic + 12V = 0 \end{cases}$$
1. Solve the equations with calculator (or by hand...) and you'll get the following results: $$\begin{cases} Ia = 420μA \\ Ib = 680μA \\ Ic = 120μA \end{cases}$$
2. Now you can get the real currents from pic: $$\begin{cases} IR1 = Ia = 420μA \\ IR2 = Ib - Ia = 260μA \\ IR3 = Ib - Ic = 560μA \\ IR4 = Ic = 120μA \end{cases}$$