Fixed a couple bugs.