there was a bug returning 0 in case of a no match. I just pushed a fix in master, going to backport it.