Fixing a few silly bugs.