Fixed some overlooked bugs.