Add tests for the last two fixes.