Hit check bug for kd-tree