More bugfixes; most failures occurring at the same point in the code