Fix incorrect conditionals in hit calc routine