Fixed some sloppy bugs.