fixed a bug slowing down hash speed