Build test fixes

Three fixes for tests that are constantly failing under CI.