fix hit detection