Minor bugfixes to prior commits of this branch.