fix 100% CPU use in keccak mode