Fixing a lot of little bugs