minor bug fix: bitsLocal and resetLocal in getRandomHeight() should
be a copy, not reference to the static variables.