Fixed a few silly bugs that I didn't notice in the previous commit.