Fix some flaky tests on the buildbots