Bugfixes discovered during minihunt.