fix compare func
spec: fix spec for compare func