Register bug fix