Fixed algorithm to see if hit