miscellaneous tweaks and fixes.