Improving molecular-dynamics simulations of simple ionic systems