Fix test failing intermittently.