Fixes rehash infinite loop in shake script