Add a missing condition and more tests