Updated the hit detection