fix cmp bug