More tests and a fix.