small speed and stability improvments