fix the bug of cmp