#162 and tests.