The particle-in-cell MCC code NAM-ECRIS is used to simulate the ECRIS plasma sustained in a mixture of Kr with O2, N2, Ar, Ne and He. The model assumes that ions are electrostatically confined in ECR zone by a dip in the plasma potential. Gain in the extracted krypton ion currents is seen for the highest charge states; the gain is maximized when oxygen is used as the mixing gas. A special feature of oxygen is that most of singly charged oxygen ions are produced after dissociative ionization of oxygen molecules with the large kinetic energy release of around 5 eV per ion. Increased loss rate of energetic lowly charged ions of the mixing element requires building up of the retarding potential barrier close to ECR surface to equilibrate electron and ion losses out of the plasma. In the mixed plasmas, the barrier value is large (~1 V) compared to the pure Kr plasma (~0.01 V), with the longer confinement times of krypton ions and with the much higher ion temperatures.