Add tests for bugs fixed.