Some new tests and fixes. [skip ci]