fixed reg reader, added tests, fixe machine wide register