fix error in compare_key+add fixed new test