Some performace tweaks