Fix exception log
Ensure cache_cmp only returns integers