fix a bug of the hit test