minor internal tweaks