Fixing a couple bugs.