Tweaking minor bugs