Tweaks to improve performance