Fix and add additional tests.