add a new test. fix a test that occasionally fails.