Fix two nasty little bugs.