misc performance tweaks.