Minor tweaks to extension handling.