Fixed a few lingering bugs from the re-working.