tweaks from jeffd! (master)