Inhibition of ion sound instability by electron trapping in toroidal systems