Remove some of the more obvious bugs.