Fixed a few old bugs.