Fixed a test that occasionally fails