Add tests for the bug fixes.