Fixing a couple dumb bugs