Fixed a few unfound bugs

Basically the commit message means that future failure was made less
likely by removing some avenues for bugs to travel.