Correct bug in register read