Fix bug on critbit: better performance