Fixed a couple of obvious bugs.