BUGFIX: highbit was off by one