This merge request is just a bunch of random fixes I did while working on the nonoverlapping mode cleanup.